package com.chuangsi.project.admin.dto.admin.agreement;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author wangshengming
 * @date 2023/3/24
 */
@Data
public class ResAgreementPageDto {

    @ApiModelProperty(value = "合同模板id")
    private String agreementId;

    @ApiModelProperty(value = "合同模板名称")
    private String agreementName;

    @ApiModelProperty(value = "管理员id")
    private Long userId;

    @ApiModelProperty(value = "管理员名称")
    private String nickName;

    @ApiModelProperty(value = "审核状态")
    private String appStatus;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    public String getAppStatus() {
        if(StrUtil.isNotBlank(appStatus)){
            if(appStatus.equals("1")){
                return "待审核";
            }
            if(appStatus.equals("2")){
                return "通过";
            }
            if(appStatus.equals("3")){
                return "驳回";
            }
        }
        return "";
    }
}
